POV-Ray : Newsgroups : povray.general : computed rotate in macros : Re: computed rotate in macros Server Time
12 Aug 2024 09:16:19 EDT (-0400)
  Re: computed rotate in macros  
From: Spider
Date: 1 Mar 1999 12:41:59
Message: <36DACFFA.B2203C07@bahnhof.se>
I can't say I understand this. some more explination please.
As you do it, I get that M is anew matrix pointer at I, then you apply a rotate
to a matrix ???? Hmm, don't get that at all.

"John M. Dlugosz" wrote:
> 
> 
> It sure is.  I don't know if it's worth doing it in POV script, though.
> It's not exactly an object-oriented language.
> 
>     matrix M= I;  // identity matrix
>     M.rotate (n*x);
>     M.rotate (n*y);
>     M.rotate (n*z);
>     M.translate (whatever);
>     // ... later
>     someObject.rotate (M);  // do the whole thing as one step
>     anotherObject.rotate (M);  // same value used here.
> 
> --John

-- 
//Spider 
( spi### [at] bahnhofse ) [ http://www.bahnhof.se/~spider/ ]
#declare life = rand(seed(42))*sqrt(-1);


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.